import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';

import { HouseService,HouseRo } from "./house.service";

@Controller('house')
export class HouseController {
    constructor(private readonly HouseService:HouseService) {
    }
    // 获取所有小区
    @Get('all')
    async getAllhouse():Promise<HouseRo>{
        return await this.HouseService.findAll()
    }
    // 获取所有小区
    @Get('find')
    async gethouse(@Query() query):Promise<HouseRo>{
        return await this.HouseService.find(query)
    }
    @Post('getHouseById')
    async getHouseById(@Body() body:any) {
        return await this.HouseService.getHouseById(body)
    }
}
